const mongoose = require("mongoose"); // 导入moogose数据库
// 创建文章模型
const schema = new mongoose.Schema({
  name: { type: String },
  categories: { type: mongoose.Schema.Types.ObjectId, ref: "Category" },
  body: { type: String }
  // 关联parent
});
// 导出数据模型
module.exports = mongoose.model("Article", schema);
